From c0c550f4952090a022b7d1a2e0a506b523441ab0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Petr=20=C5=A0tetiar?= Date: Fri, 11 Oct 2019 15:01:42 +0200 Subject: [PATCH] cgi-io: cmake: fix libraries lookup MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit In order to make it compile properly in more environments. Signed-off-by: Petr Å tetiar --- src/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6d8b158..56d9fa7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -5,6 +5,8 @@ PROJECT(cgi-io C) INCLUDE(CheckFunctionExists) FIND_PATH(ubus_include_dir libubus.h) +FIND_LIBRARY(ubox NAMES ubox) +FIND_LIBRARY(ubus NAMES ubus) INCLUDE_DIRECTORIES(${ubus_include_dir}) ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3 -Wmissing-declarations) @@ -17,6 +19,6 @@ IF(APPLE) ENDIF() ADD_EXECUTABLE(cgi-io main.c multipart_parser.c) -TARGET_LINK_LIBRARIES(cgi-io ubox ubus) +TARGET_LINK_LIBRARIES(cgi-io ${ubox} ${ubus}) INSTALL(TARGETS cgi-io RUNTIME DESTINATION sbin) -- 2.30.2